#include <stdio.h>
#include <stdlib.h>
#include "sort.h"

int insert_sort(int *data, int size){
    for(int i = 1; i < size; i++){
        int tmp = data[i], j;
        for(j = i - 1; data[j] > tmp && j >= 0; j--){
            data[j+1] = data[j];
        }
        data[j+1] = tmp;
    }
    return 0;
}